; () - grouping
; [] - optional parts
; * - repetition zero or more times
; + - repetition once or more times
; none - sequence
; | - alternatives
; -{<} - All characters except '<'
PHONELOG : ""
(ENTRY | MARK)*
[""]
ENTRY : "" [PROGRAM] HOST ((START END [PERIOD]) | BUSY | NOANSWER) ""
HOST : "" NUMBER [HOSTNAME] [REASON] ""
NUMBER : "" text ""
HOSTNAME : "" text ""
REASON : "" text ""
BUSY : "" DATE TIME ""
NOANSWER : "" DATE TIME ""
START : "" DATE TIME ""
END : "" [DATE] TIME ""
DATE : "" year "-" month "-" day ""
TIME : ""
PERIOD : "" [hours "H"] [mins "M"] [secs "S"] ""
MARK : "" PROGRAM MARKNAME ""
MARKNAME : "" text ""
PROGRAM : ""
text
""
year : [[[digit] digit] digit] digit
month : [0-1] digit
day : [0-3] digit
hour : [0-2] digit
min : [0-5] digit
sec : [0-5] digit
hours : digit+
mins : [0-5] digit
secs : [0-5] digit
digits : digit+
digit : 0-9
text : (-{<})*